import Vue from 'vue'
import Vuex from 'vuex'
//vuex  仓库
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo: '', //用户信息
    isLogin: '' //是否已登录
  },
  mutations: {
    //用于设置userInfo
    setUserInfo(state, value) {
      state.userInfo = value
    },
    //用于设置用户登录状态
    setIsLogin(state, value) {
      state.isLogin = value
    }
  },
  actions: {},
  modules: {}
})
